
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>7道Javascript题，让你理解基本的Javascript · 记录技术文档内容</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="zhengyuliang">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-sectionx/sectionx.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Array.from(" />
    
    
    <link rel="prev" href="5种常见函数的写法和调用方式.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        <li class="header">CSS</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../CSS/18种CSS命名和书写规范.html">
            
                <a href="../CSS/18种CSS命名和书写规范.html">
            
                    
                    18种CSS命名和书写规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../CSS/灵活运用CSS开发技巧.html">
            
                <a href="../CSS/灵活运用CSS开发技巧.html">
            
                    
                    灵活运用CSS开发技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../CSS/自适应 flex grid.html">
            
                <a href="../CSS/自适应 flex grid.html">
            
                    
                    自适应 Flex Grid
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">HTML</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../HTML/浏览器里的本地数据库：IndexedDB.html">
            
                <a href="../HTML/浏览器里的本地数据库：IndexedDB.html">
            
                    
                    浏览器里的本地数据库：IndexedDB
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Vue</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../Vue/7个有用的Vue开发技巧.html">
            
                <a href="../Vue/7个有用的Vue开发技巧.html">
            
                    
                    7个有用的Vue开发技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../Vue/Vue this.$router.push、replace、go的区别.html">
            
                <a href="../Vue/Vue this.$router.push、replace、go的区别.html">
            
                    
                    Vue This.$Router.Push、Replace、Go的区别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../Vue/Vue 的父组件和子组件生命周期钩子函数执行顺序？.html">
            
                <a href="../Vue/Vue 的父组件和子组件生命周期钩子函数执行顺序？.html">
            
                    
                    Vue 的父组件和子组件生命周期钩子函数执行顺序？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../Vue/Vue.set和this.$set应用的场景.html">
            
                <a href="../Vue/Vue.set和this.$set应用的场景.html">
            
                    
                    Vue.Set和This.$Set应用的场景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../Vue/vue高级技巧.html">
            
                <a href="../Vue/vue高级技巧.html">
            
                    
                    Vue高级技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../Vue/从 0 开始手把手带你搭建一套规范的 Vue3.x 项目工程环境.html">
            
                <a href="../Vue/从 0 开始手把手带你搭建一套规范的 Vue3.x 项目工程环境.html">
            
                    
                    从 0 开始手把手带你搭建一套规范的 Vue3.X 项目工程环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="../Vue/浅析 vue-router 源码和动态路由权限分配.html">
            
                <a href="../Vue/浅析 vue-router 源码和动态路由权限分配.html">
            
                    
                    浅析 Vue Router 源码和动态路由权限分配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="../Vue/父组件监听到子组件的生命周期.html">
            
                <a href="../Vue/父组件监听到子组件的生命周期.html">
            
                    
                    父组件监听到子组件的生命周期
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="../Vue/理解Vue.mixin，利用Vue.mixin正确的偷懒.html">
            
                <a href="../Vue/理解Vue.mixin，利用Vue.mixin正确的偷懒.html">
            
                    
                    理解Vue.Mixin，利用Vue.Mixin正确的偷懒
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">JavaScript</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="5个技巧让你更好的编写 JavaScript(ES6">
            
                <span>
            
                    
                    5个技巧让你更好的编写 JavaScript(ES6) 中条件语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="5种常见函数的写法和调用方式.html">
            
                <a href="5种常见函数的写法和调用方式.html">
            
                    
                    5种常见函数的写法和调用方式
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="4.3" data-path="7道javascript题，让你理解基本的javascript.html">
            
                <a href="7道javascript题，让你理解基本的javascript.html">
            
                    
                    7道Javascript题，让你理解基本的Javascript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="Array.from(">
            
                <span>
            
                    
                    Array.From() 五个超好用的用途
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="ES6汇总资料.html">
            
                <a href="ES6汇总资料.html">
            
                    
                    ES6汇总资料
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="JS开发必须知道的41个技巧.html">
            
                <a href="JS开发必须知道的41个技巧.html">
            
                    
                    JS开发必须知道的41个技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="JavaScript之防抖Debounce和节流Throttle.html">
            
                <a href="JavaScript之防抖Debounce和节流Throttle.html">
            
                    
                    JavaScript之防抖Debounce和节流Throttle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="JavaScript数组求并集，交集和差集.html">
            
                <a href="JavaScript数组求并集，交集和差集.html">
            
                    
                    JavaScript数组求并集，交集和差集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.9" data-path="JavaScript的优雅写法.html">
            
                <a href="JavaScript的优雅写法.html">
            
                    
                    JavaScript的优雅写法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.10" data-path="axios知识点.html">
            
                <a href="axios知识点.html">
            
                    
                    Axios知识点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.11" data-path="javascript核心知识.html">
            
                <a href="javascript核心知识.html">
            
                    
                    Javascript核心知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.12" data-path="this、apply、call、bind.html">
            
                <a href="this、apply、call、bind.html">
            
                    
                    This、Apply、Call、Bind
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.13" data-path="前端js常用的60余种工具方法.html">
            
                <a href="前端js常用的60余种工具方法.html">
            
                    
                    前端Js常用的60余种工具方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.14" data-path="前端异常的捕获与处理.html">
            
                <a href="前端异常的捕获与处理.html">
            
                    
                    前端异常的捕获与处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.15" data-path="在 JavaScript 中交换值的 10 种方法.html">
            
                <a href="在 JavaScript 中交换值的 10 种方法.html">
            
                    
                    在 JavaScript 中交换值的 10 种方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.16" data-path="常用的前端JavaScript方法封装.html">
            
                <a href="常用的前端JavaScript方法封装.html">
            
                    
                    常用的前端JavaScript方法封装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.17" data-path="异步神器Async-await介绍与填坑.html">
            
                <a href="异步神器Async-await介绍与填坑.html">
            
                    
                    异步神器Async Await介绍与填坑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.18" data-path="灵活运用JS开发技巧.html">
            
                <a href="灵活运用JS开发技巧.html">
            
                    
                    灵活运用JS开发技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.19" data-path="编写高质量可维护的代码：一目了然的注释.html">
            
                <a href="编写高质量可维护的代码：一目了然的注释.html">
            
                    
                    编写高质量可维护的代码：一目了然的注释
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.20" data-path="编写高质量可维护的代码：优化逻辑判断.html">
            
                <a href="编写高质量可维护的代码：优化逻辑判断.html">
            
                    
                    编写高质量可维护的代码：优化逻辑判断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.21" data-path="编写高质量可维护的代码：优雅命名.html">
            
                <a href="编写高质量可维护的代码：优雅命名.html">
            
                    
                    编写高质量可维护的代码：优雅命名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.22" data-path="编写高质量可维护的代码：数据建模.html">
            
                <a href="编写高质量可维护的代码：数据建模.html">
            
                    
                    编写高质量可维护的代码：数据建模
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Life Exp</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../life_exp/告别平庸的15个小方法.html">
            
                <a href="../life_exp/告别平庸的15个小方法.html">
            
                    
                    告别平庸的15个小方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../life_exp/日志记录.html">
            
                <a href="../life_exp/日志记录.html">
            
                    
                    日志记录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../life_exp/程序员的发展方向.html">
            
                <a href="../life_exp/程序员的发展方向.html">
            
                    
                    程序员的发展方向
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="../message/">
            
                <a href="../message/">
            
                    
                    Message
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Technology</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../technology/WebSocket.html">
            
                <a href="../technology/WebSocket.html">
            
                    
                    WebSocket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="../technology/npm常用命令大全.html">
            
                <a href="../technology/npm常用命令大全.html">
            
                    
                    Npm常用命令大全
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="../technology/智能照明项目说明.html">
            
                <a href="../technology/智能照明项目说明.html">
            
                    
                    智能照明项目说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="../technology/规范化git的提交信息.html">
            
                <a href="../technology/规范化git的提交信息.html">
            
                    
                    规范化Git的提交信息
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Tutorial</li>
        
        
    
        <li class="chapter " data-level="7.1" data-path="../tutorial/Esmap地图详解.html">
            
                <a href="../tutorial/Esmap地图详解.html">
            
                    
                    Esmap地图详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="../tutorial/npm镜像切换.html">
            
                <a href="../tutorial/npm镜像切换.html">
            
                    
                    Npm镜像切换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="../tutorial/发布npm的教程.html">
            
                <a href="../tutorial/发布npm的教程.html">
            
                    
                    发布Npm的教程
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >7道Javascript题，让你理解基本的Javascript</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <html><head></head><body><div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><ul><ul><li><span class="title-icon "></span><a href="#7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript"><b>1.1.1. </b>7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript</a></li></ul></ul></ul></div><a href="#" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h3 id="7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript"><a name="7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript" class="anchor-navigation-ex-anchor" href="#7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript"><i class="fa fa-link" aria-hidden="true"></i></a>1.1.1. 7&#x9053;javascript&#x9898;&#xFF0C;&#x8BA9;&#x4F60;&#x7406;&#x89E3;&#x57FA;&#x672C;&#x7684;javascript</h3>
<blockquote>
<p> &#x5982;&#x679C;&#x4F60;&#x7B26;&#x5408;JavaScript&#x9AD8;&#x7EA7;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x7684;&#x8D44;&#x683C;&#xFF0C;&#x5728;&#x7F16;&#x7801;&#x9762;&#x8BD5;&#x4E2D;&#x5F88;&#x6709;&#x53EF;&#x80FD;&#x4F1A;&#x88AB;&#x95EE;&#x5230;&#x4E00;&#x4E9B;&#x5201;&#x94BB;&#x7684;&#x95EE;&#x9898;&#x3002; </p>
</blockquote>
<h4 id="1-&#x610F;&#x5916;&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;"><a name="1-&#x610F;&#x5916;&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;" class="anchor-navigation-ex-anchor" href="#1-&#x610F;&#x5916;&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x610F;&#x5916;&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;</h4>
<h5 id="&#x95EE;&#x9898;"><a name="&#x95EE;&#x9898;" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<p> &#x5728;&#x4EE5;&#x4E0B;&#x4EE3;&#x7801;&#x4E2D;&#xFF0C;<code>typeof a</code>&#x548C;<code>typeof b</code>&#x7684;&#x503C;&#x5206;&#x522B;&#x662F;&#x4EC0;&#x4E48;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">foo</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">let</span> a = b = <span class="hljs-number">0</span>;
  a++;
  <span class="hljs-keyword">return</span> a;
}

foo();
<span class="hljs-keyword">typeof</span> a; <span class="hljs-comment">// =&gt; ???typeof b; // =&gt; ???</span>
</code></pre>
<h5 id="&#x7B54;&#x6848;"><a name="&#x7B54;&#x6848;" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p>&#x8BA9;&#x6211;&#x4EEC;&#x4ED4;&#x7EC6;&#x770B;&#x770B;&#x7B2C;2&#x884C;&#xFF1A;<code>let a = b = 0</code>&#x3002;&#x8FD9;&#x4E2A;&#x8BED;&#x53E5;&#x786E;&#x5B9E;&#x58F0;&#x660E;&#x4E86;&#x4E00;&#x4E2A;&#x5C40;&#x90E8;&#x53D8;&#x91CF;<code>a</code>&#x3002;&#x4F46;&#x662F;&#xFF0C;&#x5B83;&#x786E;&#x5B9E;&#x58F0;&#x660E;&#x4E86;&#x4E00;&#x4E2A;<em>&#x5168;&#x5C40;</em>&#x53D8;&#x91CF;<code>b</code>&#x3002;</p>
<p>&#x5728;<code>foo()</code>&#x4F5C;&#x7528;&#x57DF;&#x6216;&#x5168;&#x5C40;&#x4F5C;&#x7528;&#x57DF;&#x4E2D;&#x90FD;&#x6CA1;&#x6709;&#x58F0;&#x660E;&#x53D8;&#x91CF; <code>b</code> &#x201D;&#x3002;&#x56E0;&#x6B64;JavaScript&#x5C06;&#x8868;&#x8FBE;&#x5F0F; <code>b = 0</code> &#x89E3;&#x91CA;&#x4E3A; <code>window.b = 0</code>&#x3002;</p>
<p> <strong><code>b</code>&#x662F;&#x4E00;&#x4E2A;&#x5076;&#x7136;&#x521B;&#x5EFA;&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;&#x3002;</strong> </p>
<p> &#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#xFF0C;&#x4E0A;&#x8FF0;&#x4EE3;&#x7801;&#x7247;&#x6BB5;&#x76F8;&#x5F53;&#x4E8E;: </p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">foo</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">let</span> a;  <span class="hljs-built_in">window</span>.b = <span class="hljs-number">0</span>;  a = <span class="hljs-built_in">window</span>.b;  a++;
  <span class="hljs-keyword">return</span> a;
}

foo();
<span class="hljs-keyword">typeof</span> a;        <span class="hljs-comment">// =&gt; &apos;undefined&apos;</span>
<span class="hljs-keyword">typeof</span> <span class="hljs-built_in">window</span>.b; <span class="hljs-comment">// =&gt; &apos;number&apos;</span>
</code></pre>
<p><code>typeof a</code>&#x662F; <code>&apos;undefined&apos;</code>&#x3002;&#x53D8;&#x91CF;<code>a</code>&#x4EC5;&#x5728; <code>foo()</code>&#x8303;&#x56F4;&#x5185;&#x58F0;&#x660E;&#xFF0C;&#x5728;&#x5916;&#x90E8;&#x8303;&#x56F4;&#x5185;&#x4E0D;&#x53EF;&#x7528;&#x3002;</p>
<p><code>typeof b</code>&#x7B49;&#x4E8E;<code>&apos;number&apos;</code>&#x3002;<code>b</code>&#x662F;&#x4E00;&#x4E2A;&#x503C;&#x4E3A; <code>0</code>&#x7684;&#x5168;&#x5C40;&#x53D8;&#x91CF;&#x3002;</p>
<h4 id="2-&#x6570;&#x7EC4;-length-&#x5C5E;&#x6027;"><a name="2-&#x6570;&#x7EC4;-length-&#x5C5E;&#x6027;" class="anchor-navigation-ex-anchor" href="#2-&#x6570;&#x7EC4;-length-&#x5C5E;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x6570;&#x7EC4; length &#x5C5E;&#x6027;</h4>
<h5 id="&#x95EE;&#x9898;_1"><a name="&#x95EE;&#x9898;_1" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_1"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<p> <code>clothes[0]</code> &#x7684;&#x503C;&#x662F;&#x4EC0;&#x4E48;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> clothes = [<span class="hljs-string">&apos;jacket&apos;</span>, <span class="hljs-string">&apos;t-shirt&apos;</span>];
clothes.length = <span class="hljs-number">0</span>;

clothes[<span class="hljs-number">0</span>]; <span class="hljs-comment">// =&gt; ???</span>
</code></pre>
<h5 id="&#x7B54;&#x6848;_1"><a name="&#x7B54;&#x6848;_1" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_1"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p> &#x6570;&#x7EC4;&#x5BF9;&#x8C61;&#x7684; length &#x5C5E;&#x6027;&#x6709;&#x4E00;&#x4E2A; &#x7279;&#x6B8A;&#x7684;&#x884C;&#x4E3A;: </p>
<blockquote>
<p> &#x51CF;&#x5C11;<code>length</code>&#x5C5E;&#x6027;&#x7684;&#x503C;&#x6709;&#x4E00;&#x4E2A;&#x526F;&#x4F5C;&#x7528;&#xFF0C;&#x5C31;&#x662F;&#x4F1A;&#x5220;&#x9664;&#x7D22;&#x5F15;&#x4F4D;&#x4E8E;&#x65B0;&#x65E7;&#x957F;&#x5EA6;&#x503C;&#x4E4B;&#x95F4;&#x7684;&#x5143;&#x7D20;&#x3002; </p>
</blockquote>
<p>&#x56E0;&#x4E3A; <code>length</code>&#x7684;&#x8FD9;&#x79CD;&#x884C;&#x4E3A;&#xFF0C;&#x5F53;JavaScript&#x6267;&#x884C;<code>clothes.length = 0</code> &#x65F6;&#xFF0C;&#x6570;&#x7EC4; <code>clothes</code> &#x4E2D;&#x7684;&#x6240;&#x6709;&#x9879;&#x90FD;&#x88AB;&#x5220;&#x9664;&#x4E86;&#x3002;</p>
<p><code>clothes[0]</code> &#x662F;<code>undefined</code>&#xFF0C;&#x56E0;&#x4E3A; <code>clothes</code> &#x6570;&#x7EC4;&#x88AB;&#x6E05;&#x7A7A;&#x4E86;&#x3002;</p>
<h4 id="3-&#x9E70;&#x773C;&#x6D4B;&#x8BD5;"><a name="3-&#x9E70;&#x773C;&#x6D4B;&#x8BD5;" class="anchor-navigation-ex-anchor" href="#3-&#x9E70;&#x773C;&#x6D4B;&#x8BD5;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x9E70;&#x773C;&#x6D4B;&#x8BD5;</h4>
<h5 id="&#x95EE;&#x9898;_2"><a name="&#x95EE;&#x9898;_2" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_2"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<p> <code>numbers</code> &#x6570;&#x7EC4;&#x7684;&#x5185;&#x5BB9;&#x662F;&#x4EC0;&#x4E48;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> length = <span class="hljs-number">4</span>;
<span class="hljs-keyword">const</span> numbers = [];
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">var</span> i = <span class="hljs-number">0</span>; i &lt; length; i++);{
  numbers.push(i + <span class="hljs-number">1</span>);
}

numbers; <span class="hljs-comment">// =&gt; ???</span>
</code></pre>
<h5 id="&#x7B54;&#x6848;_2"><a name="&#x7B54;&#x6848;_2" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_2"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p> &#x8BA9;&#x6211;&#x4EEC;&#x4ED4;&#x7EC6;&#x770B;&#x770B;&#x51FA;&#x73B0;&#x5728;&#x5DE6;&#x82B1;&#x62EC;&#x53F7;<code>{</code>&#x524D;&#x9762;&#x7684;&#x5206;&#x53F7;<code>;</code> &#xFF1A; </p>
<p><strong>&#x5F88;&#x5BB9;&#x6613;&#x5FFD;&#x7565;&#x8FD9;&#x4E2A;&#x5206;&#x53F7;&#xFF0C;&#x800C;&#x5B83;&#x521B;&#x5EFA;&#x4E86;&#x4E00;&#x4E2A;<em>&#x7A7A;&#x8BED;&#x53E5;</em>&#x3002;&#x7A7A;&#x8BED;&#x53E5;&#x662F;&#x4E0D;&#x505A;&#x4EFB;&#x4F55;&#x4E8B;&#x60C5;&#x7684;&#x8BED;&#x53E5;&#x3002;</strong></p>
<p><code>for()</code> &#x5728;&#x7A7A;&#x8BED;&#x53E5;&#xFF08;&#x4EC0;&#x4E48;&#x4E5F;&#x4E0D;&#x505A;&#xFF09;&#x4E0A;&#x5FAA;&#x73AF;&#x4E86; 4 &#x6B21;&#xFF0C;&#x5FFD;&#x7565;&#x4E86;&#x5B9E;&#x9645;&#x4E0A;&#x5F80;&#x6570;&#x7EC4;&#x91CC;&#x6DFB;&#x52A0;&#x5143;&#x7D20;&#x7684;&#x4EE3;&#x7801;&#x5757;<code>{ numbers.push(i + 1); }</code>&#x3002;</p>
<p> &#x4E0A;&#x8FF0;&#x4EE3;&#x7801;&#x7B49;&#x540C;&#x4E8E;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> length = <span class="hljs-number">4</span>;
<span class="hljs-keyword">const</span> numbers = [];
<span class="hljs-keyword">var</span> i;
<span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>; i &lt; length; i++) {
  <span class="hljs-comment">// does nothing</span>
}
{ 
  <span class="hljs-comment">// a simple block</span>
  numbers.push(i + <span class="hljs-number">1</span>);
}

numbers; <span class="hljs-comment">// =&gt; [5]</span>
</code></pre>
<p><code>for()</code>&#x9012;&#x589E;&#x53D8;&#x91CF;<code>i</code>&#x76F4;&#x5230;<code>4</code>&#x3002;&#x7136;&#x540E;JavaScript &#x8FDB;&#x5165;&#x4EE3;&#x7801;&#x5757; <code>{ numbers.push(i + 1); }</code>&#xFF0C;&#x5C06;<code>4 + 1</code> &#x6DFB;&#x52A0; &#x5230;<code>numbers</code>&#x6570;&#x7EC4;&#x4E2D;&#x3002;</p>
<p>&#x8FD9;&#x6837; <code>numbers</code> &#x5C31;&#x662F; <code>[5]</code>.</p>
<h4 id="4-&#x81EA;&#x52A8;&#x63D2;&#x5165;&#x5206;&#x53F7;"><a name="4-&#x81EA;&#x52A8;&#x63D2;&#x5165;&#x5206;&#x53F7;" class="anchor-navigation-ex-anchor" href="#4-&#x81EA;&#x52A8;&#x63D2;&#x5165;&#x5206;&#x53F7;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x81EA;&#x52A8;&#x63D2;&#x5165;&#x5206;&#x53F7;</h4>
<h5 id="&#x95EE;&#x9898;_3"><a name="&#x95EE;&#x9898;_3" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_3"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">arrayFromValue</span>(<span class="hljs-params">item</span>) </span>{
  <span class="hljs-keyword">return</span>
    [items];
}

arrayFromValue(<span class="hljs-number">10</span>); <span class="hljs-comment">// =&gt; ???</span>
</code></pre>
<h5 id="&#x7B54;&#x6848;_3"><a name="&#x7B54;&#x6848;_3" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_3"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p><strong>&#x5F88;&#x5BB9;&#x6613;&#x5FFD;&#x7565;<code>return</code>&#x5173;&#x952E;&#x5B57;&#x548C;<code>[items]</code>&#x8868;&#x8FBE;&#x5F0F;&#x4E4B;&#x95F4;&#x7684;&#x6362;&#x884C;&#x3002;</strong></p>
<p><strong>&#x6362;&#x884C;&#x4F7F;JavaScript&#x81EA;&#x52A8;&#x5728;<code>return</code>&#x548C;<code>[items]</code>&#x8868;&#x8FBE;&#x5F0F;&#x4E4B;&#x95F4;&#x63D2;&#x5165;&#x4E00;&#x4E2A;&#x5206;&#x53F7;&#x3002;</strong></p>
<p>&#x8FD9;&#x91CC;&#x6709;&#x4E00;&#x6BB5;&#x7B49;&#x4EF7;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x5B83;&#x5728;<code>return</code>&#x540E;&#x63D2;&#x5165;&#x5206;&#x53F7;&#xFF1A;</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">arrayFromValue</span>(<span class="hljs-params">item</span>) </span>{
  <span class="hljs-keyword">return</span>;  [items];
}

arrayFromValue(<span class="hljs-number">10</span>); <span class="hljs-comment">// =&gt; undefined</span>
</code></pre>
<p>&#x51FD;&#x6570;&#x4E2D;&#x7684; <code>return;</code> &#x5BFC;&#x81F4;&#x5B83;&#x8FD4;&#x56DE; <code>undefined</code>&#x3002;</p>
<p>&#x56E0;&#x6B64; <code>arrayFromValue(10)</code> &#x7684;&#x503C;&#x662F; <code>undefined</code>&#x3002;</p>
<h4 id="5-&#x7ECF;&#x5178;&#x95EE;&#x9898;&#xFF1A;&#x5751;&#x7239;&#x7684;&#x95ED;&#x5305;"><a name="5-&#x7ECF;&#x5178;&#x95EE;&#x9898;&#xFF1A;&#x5751;&#x7239;&#x7684;&#x95ED;&#x5305;" class="anchor-navigation-ex-anchor" href="#5-&#x7ECF;&#x5178;&#x95EE;&#x9898;&#xFF1A;&#x5751;&#x7239;&#x7684;&#x95ED;&#x5305;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x7ECF;&#x5178;&#x95EE;&#x9898;&#xFF1A;&#x5751;&#x7239;&#x7684;&#x95ED;&#x5305;</h4>
<h4 id="&#x95EE;&#x9898;_4"><a name="&#x95EE;&#x9898;_4" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_4"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h4>
<p> &#x4EE5;&#x4E0B;&#x811A;&#x672C;&#x5C06;&#x4F1A;&#x5728;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;&#x4EC0;&#x4E48;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-keyword">let</span> i;
<span class="hljs-keyword">for</span> (i = <span class="hljs-number">0</span>; i &lt; <span class="hljs-number">3</span>; i++) {
  <span class="hljs-keyword">const</span> log = <span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> {
    <span class="hljs-built_in">console</span>.log(i);  }
  setTimeout(log, <span class="hljs-number">100</span>);
}
</code></pre>
<h5 id="&#x7B54;&#x6848;_4"><a name="&#x7B54;&#x6848;_4" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_4"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p>&#x5982;&#x679C;&#x4F60;&#x4E4B;&#x524D;&#x6CA1;&#x6709;&#x542C;&#x8BF4;&#x8FC7;&#x8FD9;&#x4E2A;&#x68D8;&#x624B;&#x7684;&#x95EE;&#x9898;&#xFF0C;&#x4F60;&#x7684;&#x7B54;&#x6848;&#x5F88;&#x53EF;&#x80FD;&#x662F;<code>0</code>, <code>1</code> &#x548C; <code>2</code>&#xFF0C;&#x8FD9;&#x662F;&#x4E0D;&#x6B63;&#x786E;&#x7684;&#x3002;&#x5F53;&#x6211;&#x7B2C;&#x4E00;&#x6B21;&#x5C1D;&#x8BD5;&#x89E3;&#x7B54;&#x5B83;&#x65F6;&#xFF0C;&#x6211;&#x7684;&#x7B54;&#x6848;&#x4E5F;&#x662F;&#x8FD9;&#x6837;&#xFF01;</p>
<p>&#x6267;&#x884C;&#x8FD9;&#x4E2A;&#x4EE3;&#x7801;&#x6BB5;&#x5305;&#x542B;&#x4E24;&#x4E2A;&#x6B65;&#x9AA4;&#x3002;
 <strong>&#x6B65;&#x9AA4; 1</strong></p>
<ol>
<li><code>for()</code>&#x8FED;&#x4EE3;3&#x6B21;&#x3002;&#x5728;&#x6BCF;&#x6B21;&#x8FED;&#x4EE3;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;&#x90FD;&#x4F1A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x51FD;&#x6570;<code>log()</code>&#xFF0C;&#x5B83;&#x6355;&#x83B7;&#x53D8;&#x91CF; <code>i</code>&#x3002;&#x7136;&#x540E;<code>setTimout()</code>&#x6267;&#x884C;<code>log()</code>&#x3002;</li>
<li>&#x5F53;<code>for()</code>&#x5FAA;&#x73AF;&#x5B8C;&#x6210;&#x65F6;&#xFF0C;<code>i</code>&#x53D8;&#x91CF;&#x7684;&#x503C;&#x4E3A;<code>3</code>&#x3002;</li>
</ol>
<p><code>log()</code>&#x662F;&#x4E00;&#x4E2A;&#x6355;&#x83B7;&#x53D8;&#x91CF; <code>i</code> &#x7684;&#x95ED;&#x5305;&#xFF0C;&#x5B83;&#x5728;<code>for()</code>&#x5FAA;&#x73AF;&#x7684;&#x5916;&#x90E8;&#x4F5C;&#x7528;&#x57DF;&#x5B9A;&#x4E49;&#x3002;&#x91CD;&#x8981;&#x7684;&#x662F;&#x8981;&#x7406;&#x89E3;&#x95ED;&#x5305;&#x4ECE;&#x8BCD;&#x6CD5;&#x4E0A;&#x6355;&#x83B7;&#x4E86;<em>&#x53D8;&#x91CF;</em><code>i</code> &#x3002;
 <strong>&#x6B65;&#x9AA4; 2</strong></p>
<p>&#x7B2C;2&#x6B65;&#x5728; 100 &#x6BEB;&#x79D2;&#x540E;&#x53D1;&#x751F;&#xFF1A;</p>
<p><code>setTimeout()</code>&#x8C03;&#x7528;&#x4E86;&#x961F;&#x5217;&#x4E2D;&#x7684;3&#x4E2A;<code>log()</code> &#x56DE;&#x8C03;&#x3002;<code>log()</code> &#x8BFB;&#x53D6;&#x53D8;&#x91CF; <code>i</code>&#x7684;<em>&#x5F53;&#x524D;&#x503C;</em>&#xFF0C;&#x5373;<code>3</code>&#xFF0C;&#x5E76;&#x8BB0;&#x5F55;&#x5230;&#x63A7;&#x5236;&#x53F0;<code>3</code>&#x3002;</p>
<p><strong>&#x8FD9;&#x5C31;&#x662F;&#x4E3A;&#x4EC0;&#x4E48;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;<code>3</code>, <code>3</code> &#x548C;<code>3</code>&#x3002;</strong></p>
<p><em>&#x4F60;&#x77E5;&#x9053;&#x600E;&#x6837;&#x8BA9;&#x4EE3;&#x7801;&#x8F93;&#x51FA; <code>0</code>, <code>1</code>, &#x548C; <code>2</code>&#x5417;&#xFF1F;&#x8BF7;&#x5728;&#x8BC4;&#x8BBA;&#x91CC;&#x5199;&#x51FA;&#x4F60;&#x7684;&#x65B9;&#x6848;&#x3002;</em></p>
<h4 id="6-&#x6D6E;&#x70B9;&#x6570;&#x95EE;&#x9898;"><a name="6-&#x6D6E;&#x70B9;&#x6570;&#x95EE;&#x9898;" class="anchor-navigation-ex-anchor" href="#6-&#x6D6E;&#x70B9;&#x6570;&#x95EE;&#x9898;"><i class="fa fa-link" aria-hidden="true"></i></a>6. &#x6D6E;&#x70B9;&#x6570;&#x95EE;&#x9898;</h4>
<h5 id="&#x95EE;&#x9898;_5"><a name="&#x95EE;&#x9898;_5" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_5"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<p> &#x7B49;&#x53F7;&#x5224;&#x65AD;&#x7684;&#x7ED3;&#x679C;&#x662F;&#x4EC0;&#x4E48;&#xFF1F; </p>
<pre><code class="lang-javascript"><span class="hljs-number">0.1</span> + <span class="hljs-number">0.2</span> === <span class="hljs-number">0.3</span> <span class="hljs-comment">// =&gt; ???</span>
</code></pre>
<h5 id="&#x7B54;&#x6848;_5"><a name="&#x7B54;&#x6848;_5" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_5"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p> &#x9996;&#x5148;&#xFF0C;&#x6211;&#x4EEC;&#x770B;&#x770B;<code>0.1 + 0.2</code> &#x7684;&#x503C;&#xFF1A; </p>
<pre><code class="lang-javascript"><span class="hljs-number">0.1</span> + <span class="hljs-number">0.2</span>; <span class="hljs-comment">// =&gt; 0.30000000000000004</span>
</code></pre>
<p><code>0.1</code> &#x548C; <code>0.2</code> &#x7684;&#x548C; <em>&#x4E0D;&#x5B8C;&#x5168;&#x7B49;&#x4E8E;</em>  <code>0.3</code>&#xFF0C;&#x800C;&#x662F;&#x7565;&#x5927;&#x4E8E; <code>0.3</code>&#x3002;</p>
<p>&#x7531;&#x4E8E;&#x6D6E;&#x70B9;&#x6570;&#x5728;&#x4E8C;&#x8FDB;&#x5236;&#x4E2D;&#x7684;&#x7F16;&#x7801;&#x673A;&#x5236;&#xFF0C;&#x50CF;&#x6D6E;&#x70B9;&#x6570;&#x7684;&#x52A0;&#x6CD5;&#x8FD9;&#x6837;&#x7684;&#x64CD;&#x4F5C;&#x4F1A;&#x53D7;&#x5230;&#x820D;&#x5165;&#x8BEF;&#x5DEE;&#x7684;&#x5F71;&#x54CD;&#x3002;</p>
<p>&#x7B80;&#x5355;&#x5730;&#x8BF4;&#xFF0C;&#x76F4;&#x63A5;&#x6BD4;&#x8F83;&#x6D6E;&#x70B9;&#x6570;&#x662F;&#x4E0D;&#x7CBE;&#x786E;&#x7684;&#x3002;</p>
<p>&#x56E0;&#x6B64; <code>0.1 + 0.2 === 0.3</code> &#x662F; <code>false</code>.</p>
<h4 id="7-&#x53D8;&#x91CF;&#x63D0;&#x5347;"><a name="7-&#x53D8;&#x91CF;&#x63D0;&#x5347;" class="anchor-navigation-ex-anchor" href="#7-&#x53D8;&#x91CF;&#x63D0;&#x5347;"><i class="fa fa-link" aria-hidden="true"></i></a>7. &#x53D8;&#x91CF;&#x63D0;&#x5347;</h4>
<h5 id="&#x95EE;&#x9898;_6"><a name="&#x95EE;&#x9898;_6" class="anchor-navigation-ex-anchor" href="#&#x95EE;&#x9898;_6"><i class="fa fa-link" aria-hidden="true"></i></a>&#x95EE;&#x9898;</h5>
<p> &#x5982;&#x679C;&#x5728;&#x58F0;&#x660E;&#x4E4B;&#x524D;&#x8BBF;&#x95EE;<code>myVar</code>&#x548C;<code>myConst</code>&#x4F1A;&#x53D1;&#x751F;&#x4EC0;&#x4E48;? </p>
<pre><code class="lang-javascript">myVar;   <span class="hljs-comment">// =&gt; ???myConst; // =&gt; ???</span>
<span class="hljs-keyword">var</span> myVar = <span class="hljs-string">&apos;value&apos;</span>;
<span class="hljs-keyword">const</span> myConst = <span class="hljs-number">3.14</span>;
</code></pre>
<h5 id="&#x7B54;&#x6848;_6"><a name="&#x7B54;&#x6848;_6" class="anchor-navigation-ex-anchor" href="#&#x7B54;&#x6848;_6"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7B54;&#x6848;</h5>
<p> &#x53D8;&#x91CF;&#x63D0;&#x5347;&#x548C;&#x6682;&#x65F6;&#x6027;&#x6B7B;&#x533A;&#x662F;&#x5F71;&#x54CD;JavaScript&#x53D8;&#x91CF;&#x751F;&#x547D;&#x5468;&#x671F;&#x7684;&#x4E24;&#x4E2A;&#x91CD;&#x8981;&#x6982;&#x5FF5;&#x3002; </p>
<p>&#x5728;&#x58F0;&#x660E;&#x4E4B;&#x524D;&#x8BBF;&#x95EE; <code>myVar</code> &#x7ED3;&#x679C;&#x4E3A;<code>undefined</code>&#x3002;&#x4E00;&#x4E2A;&#x88AB;&#x63D0;&#x5347;&#x7684;<code>var</code>&#x53D8;&#x91CF;&#xFF0C;&#x5728;&#x5B83;&#x7684;&#x521D;&#x59CB;&#x5316;&#x4E4B;&#x524D;&#xFF0C;&#x6709;&#x4E00;&#x4E2A; <code>undefined</code>&#x7684;&#x503C;&#x3002;</p>
<p>&#x4F46;&#x662F;&#xFF0C;&#x5728;&#x58F0;&#x660E;&#x4E4B;&#x524D;&#x8BBF;&#x95EE;<code>myConst</code>&#x4F1A;&#x629B;&#x51FA; <code>ReferenceError</code>&#x3002;&#x5728;&#x58F0;&#x660E;&#x884C;<code>const myConst = 3.14</code>&#x4E4B;&#x524D;&#xFF0C;<code>const</code> &#x53D8;&#x91CF;&#x5904;&#x4E8E;&#x6682;&#x65F6;&#x6B7B;&#x533A;&#x3002;</p>
<blockquote>
<p>NND&#xFF0C;&#x8FD9;&#x51E0;&#x9053;&#x9898;&#xFF0C;&#x6211;&#x4E00;&#x76F4;&#x4E5F;&#x6CA1;&#x6709;&#x5565;&#x7559;&#x610F;&#x7684;&#xFF0C;&#x8981;&#x6211;&#x9996;&#x6B21;&#x505A;&#xFF0C;&#x5E94;&#x8BE5;&#x6302;&#x7684;&#x4E5F;&#x6BD4;&#x8F83;&#x5C45;&#x591A;&#x3002;&#x8FD9;&#x6B21;&#x4ECE;&#x7B80;&#x4E66;&#x4E0A;&#x770B;&#x5230;&#xFF0C;&#x5C31;&#x8BB0;&#x5F55;&#x4E00;&#x4E0B;&#xFF0C;&#x6DA8;&#x6DA8;&#x77E5;&#x8BC6;&#x3002;&#x543C;~~~~ </p>
</blockquote>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; zhengyuliang all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x7F16;&#x5199;&#x65F6;&#x95F4;&#xFF1A;
2019-11-18 15:18:04
</span></footer></body></html>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="5种常见函数的写法和调用方式.html" class="navigation navigation-prev " aria-label="Previous page: 5种常见函数的写法和调用方式">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Array.from(" class="navigation navigation-next " aria-label="Next page: Array.From() 五个超好用的用途">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"7道Javascript题，让你理解基本的Javascript","level":"4.3","depth":1,"next":{"title":"Array.From() 五个超好用的用途","level":"4.4","depth":1,"path":"javaScript/Array.from(","ref":"javaScript/Array.from(","articles":[]},"previous":{"title":"5种常见函数的写法和调用方式","level":"4.2","depth":1,"path":"javaScript/5种常见函数的写法和调用方式.md","ref":"javaScript/5种常见函数的写法和调用方式.md","articles":[]},"dir":"ltr"},"config":{"plugins":["sectionx","splitter","tbfed-pagefooter","toggle-chapters","theme-comscore","-lunr","-search","search-plus","donate","anchor-navigation-ex","expandable-chapters","chapter-fold","expandable-chapters-small","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy zhengyuliang","modify_label":"该文件编写时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"anchor-navigation-ex":{"showLevel":false,"showGoTop":true,"isRewritePageTitle":true,"isShowTocTitleIcon":true,"tocLevel1Icon":"fa fa-hand-o-right","tocLevel2Icon":"fa fa-hand-o-right","tocLevel3Icon":"fa fa-hand-o-right"}},"livereload":{},"splitter":{},"donate":{"title":"","button":"赏","wechat":"https://gitee.com/htzyl/img_bed/raw/master/pay/weixin-min.jpg","alipay":"https://gitee.com/htzyl/img_bed/raw/master/pay/alipay-min.jpg","wechatText":"微信打赏","alipayText":"支付宝打赏"},"fontsettings":{"theme":"white","family":"sans","size":2},"sectionx":{"tag":"b"},"highlight":{},"anchor-navigation-ex":{"showLevel":true,"associatedWithSummary":true,"mode":"float","showGoTop":true,"printLog":false,"multipleH1":true,"float":{"floatIcon":"fa fa-navicon","showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"theme-comscore":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"toggle-chapters":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"zhengyuliang","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"记录技术文档内容","language":"zh-hans","gitbook":">=3.0.0","description":"记录Gitbook的配置和一些插件的使用","theme-default":{"showLevel":true}},"file":{"path":"javaScript/7道javascript题，让你理解基本的javascript.md","mtime":"2019-11-18T07:18:04.680Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-01-06T09:44:01.178Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sectionx/sectionx.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

